package org.lgiavedoni.android.franq.httpserver;

import java.util.HashMap;
import java.util.Map;

import org.apache.velocity.VelocityContext;
import org.lgiavedoni.android.franq.core.httpserver.HttpPageController;
import org.lgiavedoni.android.franq.service.db.DbService;

public class DBDetailPage extends HttpPageController {

	@Override
	public String getPath() {
		return "dbDataDetail.html";
	}

	public VelocityContext actionDetail(VelocityContext context, HashMap<String, String> params) {
		context.put("list", DbService.inst.getAll(DbService.inst.getEntytiClass(params.get("entity"))));
		return context;

	}

	@Override
	public String getTemplateName(Map<String, String> params) {
		return "dbDataDetail.html";
	}

	@Override
	public VelocityContext actionDefault(VelocityContext context) {
		// TODO Auto-generated method stub
		return null;
	}

}
